<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2017/7/5
 * Time: 15:15
 * Project name: PHPTEST
 * File name: 1.php
 * @copyright Copyright (c) 2016 ZRX Software LLC
 * @license https://github.com/zhangrxiang
 * @since 1.0.0
 */

/**
 * @param array ...$a
 *
 * @since version
 */
$a = function(...$a){
	echo func_num_args().PHP_EOL;
	var_dump(func_get_args());
	echo (func_get_arg(func_num_args()-1)).PHP_EOL;
	echo (func_get_arg(func_num_args()-2)).PHP_EOL;
	echo (func_get_arg(func_num_args()-3)).PHP_EOL;
};

$a(1,2,3,4,5,6);

echo strcmp("a","b").PHP_EOL;
echo strcmp("a","a").PHP_EOL;
echo strcmp("b","a").PHP_EOL;

//* Binary safe string comparison of the first n characters
echo strncmp("a","b",1).PHP_EOL;
echo strncmp("abd","abc",3).PHP_EOL;
echo strncmp("b","a",1).PHP_EOL;

//* Binary safe case-insensitive string comparison
echo strcasecmp("a","B").PHP_EOL;
echo strcasecmp("a","A").PHP_EOL;
echo strcasecmp("B","a").PHP_EOL;


//* Return the current key and value pair from an array and advance the array cursor

$a = ['a','c','d'];
var_dump(each($a));
var_dump(each($a));
print_r(each($a));